package autoteam.ui.dialogs.profiles;

import javax.swing.JButton;
import javax.swing.JLabel;
// import javax.swing.JTable;

import db.DBRecord;


public class TeamProfile extends ProfilePanel
{
    private static final long serialVersionUID = -4564754536826190617L;

    private JLabel teamLabel;
    private JLabel coachLabel;
    private JLabel sportLabel;
    private final JButton bioButton = new JButton("Team Biography");
    
    // private JTable playerTable = new JTable(15,200);
    
    public TeamProfile( DBRecord record )
    {
        super( record );
        
        String teamName = record.getFieldValue( "teamName" ).toString( );
        String coachName = record.getFieldValue( "coachName" ).toString( );
        String sportType = record.getFieldValue( "sport" ).toString( );
        String biographyText =  record.getFieldValue( "biography" ).toString( );
        
        this.setName( teamName );
        this.setBiography( biographyText, ProfilePanel.defaultFont, !editable );
        this.hideBiography( );
        
        teamLabel = new JLabel("Team Name: \t" + teamName );
        sportLabel = new JLabel("Sport: \t" + sportType );
        coachLabel = new JLabel("Head Coach: \t" + coachName );
        
        setBounds();
    }

    @Override
    public void setBounds()
    {
        coachLabel.setBounds( 0, 0, 100, 100 );
        bioButton.setBounds( 0, 300, 100, 100 );
    }
    
}